﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;

namespace BLL
{
    /// <summary>
    /// BLL to Fee table
    /// </summary>
    public class FeeBLL : DAL.FeeDAL
    {
        #region Contansts
        #endregion

        #region Objects
        #endregion

        #region Properties
        /// <summary>
        /// Get current cost eletricity
        /// </summary>
        public decimal PriceElec
        {
            get
            {
                var res = Select();
                DataRow[] dtr = res.Select("Name = 'Điện'");
                return UTL.Number.ToDecimal(dtr[0]["Cost"] + "");
            }
        }

        /// <summary>
        /// Get current cost water
        /// </summary>
        public decimal PriceWater
        {
            get
            {
                var res = Select();
                DataRow[] dtr = res.Select("Name = 'Nước'");
                return UTL.Number.ToDecimal(dtr[0]["Cost"] + "");
            }
        }
        #endregion

        #region Constructors
        public FeeBLL() { }
        public FeeBLL(string connectString) : base(connectString) { }
        #endregion

        #region Implements
        #endregion

        #region Events
        #endregion

        #region Methods
        #endregion

        #region Overrides
        #endregion

        #region Statics
        #endregion

        #region More
        #endregion
    }
}